/**
 * @author DJJ_F
 * @version 1.0
 * @date 2024/12/01
 * @description
 */
public class P2 {
    private String name;
    private Person friend;

    public P2() {
    }

    public P2(String name, Person friend) {
        this.name = name;
        this.friend = friend;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Person getFriend() {
        return friend;
    }

    public void setFriend(Person friend) {
        this.friend = friend;
    }

    @Override
    public String toString() {
        return "P2{" +
                "name='" + name + '\'' +
                ", friend=" + friend.getName() +
                '}';
    }
}
